package com.finance.system.bean.pojo;

import com.finance.framework.lang.BaseObject;
import lombok.Data;

import java.util.List;

/**
 * Created by CBWL on 2017/3/17.
 */
@Data
public class Role extends BaseObject {
    private String name;//角色名称
    private String description;//描述
    private Integer authorized;//是否可传授
    private List<Menu> menuList;//菜单列表
    private List<String> menuCodeList;//菜单code列表

    @Override
    public boolean equals(Object object){
        if(object instanceof  Role){
            Role role = (Role) object;
            return role.getId().equals(super.getId());
        }
        return false;
    }
    @Override
    public int hashCode(){
        return this.getId().hashCode();
    }
}
